package org.dromara.xhlj.domain;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import org.dromara.starter.jpacomment.annotation.SailColumn;
import org.dromara.starter.jpacomment.annotation.SailIndex;
import org.dromara.starter.jpacomment.annotation.SailTable;
import org.dromara.starter.jpacomment.enums.IndexType;
/**
 * 商品兑换记录对象 xhlj_goods_redemption_records
 *
 * @author yf
 * @date 2024-07-28
 */

@Data
@TableName("xhlj_goods_redemption_records")
@Entity
@Table(name = "xhlj_goods_redemption_records")
@SailTable(comment = "商品兑换记录表", indexs = {
    @SailIndex(name = "idx_redemption_date", type = IndexType.BTREE,
       columns = {"redemption_date"}
    ),    @SailIndex(name = "idx_good_id", type = IndexType.BTREE,
       columns = {"goods_id"}
    ),    @SailIndex(name = "idx_user_id", type = IndexType.BTREE,
       columns = {"create_by"}
    )}
)
public class XhljGoodsRedemptionRecords implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;
    public static final String TRANS_ID_TO_VO = "xhlj_goodsRedemptionRecords_vo";
    public static final String TRANS_ID_TO_VO_LIST = "xhlj_goodsRedemptionRecords_list";
    /**
     * 兑换记录ID
     */
    @TableId(value = "record_id", type = IdType.AUTO)
    @Id
    private Integer recordId;
    /**
     * 兑换所用积分
     */
    @Column(name = "redemption_points")
    @SailColumn(comment = "兑换所用积分",type = "decimal(10,2)", defaultValue = "NULL")
    private BigDecimal redemptionPoints;
    /**
     * wx_user（兑换用户）
     */
    @SailColumn(comment = "wx_user（兑换用户）",type = "int", defaultValue = "NULL")
    @Column(name = "create_by")
    private Integer createBy;
    /**
     * 兑换的商品ID
     */
    @SailColumn(comment = "兑换的商品ID",type = "int", defaultValue = "NULL")
    @Column(name = "goods_id")
    private Integer goodsId;
    /**
     * 兑换所用货币金额
     */
    @Column(name = "redemption_currency")
    @SailColumn(comment = "兑换所用货币金额",type = "decimal(10,2)", defaultValue = "NULL")
    private BigDecimal redemptionCurrency;
    /**
     * 兑换日期和时间
     */
    @Column(name = "redemption_date")
    @SailColumn(comment = "兑换日期和时间",type = "timestamp", defaultValue = "CURRENT_TIMESTAMP")
    private Date redemptionDate;
    /**
     * 兑换状态（0=已使用，1=待使用）
     */
    @Column(name = "status")
    @SailColumn(comment = "兑换状态（0=已使用，1=待使用）",type = "char(3)", defaultValue = "0")
    private String status;
    /**
     * 删除标志（0=未删除，2=已删除）
     */
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    @Column(name = "del_flag")
    @SailColumn(comment = "删除标志（0=未删除，2=已删除）",type = "char(1)", defaultValue = "0")
    private String delFlag;
}
